package org.ali.creationalpattern.singletonpattern.singletonobject;

/**
 * 饿汉式，线程安全，高性能
 */
public class SingletonObject1 {
    private static final SingletonObject1 object = new SingletonObject1();

    private SingletonObject1() {
    }

    public static SingletonObject1 getInstance() {
        return object;
    }

    public void showMessage() {
        System.out.println("饿汉式，线程安全，高性能");
    }
}
